package javase2.day02;

import java.util.Arrays;

public class Demo2 {

  public static void main(String[] args) {
    String s = "1| tom| tom@gmail.com| 119|����";
    String[] ary = s.split("\\|\\s*");// \|\s*
    System.out.println(Arrays.toString(ary)); 
    
    String name = "robinliu";
    String rule = "^\\w{8,10}$";//��¼�����
    if(name.matches(rule)){
      System.out.println("����ĵ�¼��"); 
    }
    //String str = s.replaceAll("^\\|\\s*$", ",");//����Ĺ���
    String str = s.replaceAll("\\|\\s*", ",");
    System.out.println(str); 
    System.out.println(s); 
       
  }

}






